package com.example.demo.arithmetic.algorithm.recursion;

/**
 * 回溯
 */
public class BackTracking {
    public static void main(String[] args) {
        sec(1);
    }

    private static void sec(int i) {
        if (i == 3) return;
        System.out.println(i);
        sec(i + 1);
        System.out.println(i);
    }
}
